define(function(require){
	var $=require("jq");
	var dialogcss=require("/pinzhiV2.0/css/pz-dialog.css");
	var Dialog=require("pz_use_dialog.js");
	
	var articleId = $('#articleId').val();
	var message = $('#message').val();
	var title = $('#title').val();
	
	$(document).ready(function(){
		if (articleId != -1) {
			if (message != "") {
				var tips=new PZ_Dialog({
					  type:"tips",
					  width:300,
					  text:message+'',
					  delay:2,			//提示框延时几秒，不提供默认为3秒关闭
					  mask:"transparent"
					  });
			} else {
				var tips=new PZ_Dialog({
					  type:"tips",
					  //width:300,
					  text:title+"成功！",
					  delay:2,			//提示框延时几秒，不提供默认为3秒关闭
					  mask:"transparent"
					  });
			}
		}
		
		$('#search-proxy i').on('click',function(){
			var searchText = $("#articleKey").val();
			if(searchText == null || searchText == "undefined" || searchText == "") {
				var tips=new PZ_Dialog({
					  type:"tips",
					  text:"请输入查询条件！！！",
					  delay:1,			//提示框延时几秒，不提供默认为3秒关闭
					  mask:"transparent"
					  });
				return;
			}
			window.location.href = "/vipCenter/manageMyAttorneys.do?menu_id=23&operateType=0&keyword=" + encodeURI(encodeURI(searchText));
		});
	});
});